package com.wkbb.common.enums;

/**
 * @author luowenyan
 * 状态(0正常 1晚归 2未归)
 */
public enum DoorStatStatusEnum {
    /**
     * 正常
     */
    NORMAL_ACCESS(0,"正常"),

    /**
     * 晚归
     */
    LATE_RETURN(1,"晚归"),

    /**
     * 未归
     */
    NOT_RETURN(2,"未归");

    private DoorStatStatusEnum(Integer value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    private Integer value;

    private String desc;

    public Integer getValue() {
        return this.value;
    }

    public void setValue(Integer value) {
        this.value = value;
    }

    public String getDesc() {
        return this.desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public static String getDesc(Integer value) {
        for (DoorStatStatusEnum statStatus : DoorStatStatusEnum.values()) {
            if (statStatus.getValue().intValue()==value) {
                return statStatus.getDesc();
            }
        }
        return null;
    }
}
